package com.zyf.chapter01.principle.DRY.refactor;

import com.zyf.chapter01.principle.DRY.User;
import com.zyf.chapter01.principle.DRY.utils.EmailValidation;
import com.zyf.chapter01.principle.DRY.utils.PasswordValidation;

/**
 * user 持久层
 * 重构后，不在持久层执行任何参数校验
 * @author yifeng
 */
public class UserRepo {
    public boolean checkIfUserExisted(String email, String password) {
        // ... query db to check if email&password exists ...
        return false;
    }

    public User getUserByEmail(String email) {
        // ... query db to check if email&password exists ...
        return null;
    }
}